import { getTemplateList } from '@/api/template'

const templateMixin = {
  mounted() {
    this.getSelectTemplateList()
  },
  methods: {
    getSelectTemplateList() {
      getTemplateList().then(res => {
        this.templateList = res.data
        this.templateList.unshift({
          id: -1,
          templateName: '所有模板'
        })
      })
    }
  }
}
export default templateMixin
